package com.woniu.client;

import com.woniu.client.model.EmployeeDto;
import com.woniu.model.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "staff-server",path = "/staff")
public interface StaffClient {
    /**
     * 根据账号id查询员工实体
     * id 账号id
     */
    @GetMapping("/employee/byAccountId/{id}")
    @ApiOperation("根据账号id查询员工实体")
     Result<EmployeeDto> byAccountId(@PathVariable("id") Integer id);

    /**
     * 员工绑定站点
     * id 账号id roleId 角色id
     */
    @GetMapping("/employee/bindingStation/{id}/{stationId}")
    @ApiOperation("员工绑定站点")
    Result<EmployeeDto> bindingStation(@PathVariable("id") Integer id,@PathVariable("stationId") Integer stationId);
}
